IF EXISTS (SELECT 1 FROM sysobjects where name='ExcelExportView' and type='v')
DROP VIEW ExcelExportView
GO

CREATE VIEW ExcelExportView
AS
SELECT
Title+' ('+convert(varchar,[Year])+')' AS Title,
Year as Year,
CASE WHEN Title<>AlternateTitle THEN AlternateTitle ELSE '' END AS "Alt. Title (if any)",
Director as Director,
Genre as Genre,
Volume+' :: '+Collection AS "Volume/Collection",
ID as ID,
CASE Seen WHEN 'Y' THEN 'Yes' WHEN 'N' THEN 'No' END AS Seen,
convert(int,Rating) as Rating,
--convert(varchar,Rating)+'/'+convert(varchar,MyRating) AS Rating,
CASE WHEN RunTime>0 THEN convert(varchar,RunTime)+' mins' ELSE '' END AS RunTime,
Studio as Studio




FROM MuveeDetailsView
WHERE Status<>'d'
